<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<%@include file="ValidarSession.jsp"%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Control de Usuarios</title>
 
<script>
function validar(){
var id = document.formUser.txtid.value;
var p1 = document.formUser.txtpass01.value;
var p2 = document.formUser.txtpass02.value;
var no = document.formUser.txtnombre.value;
var ap = document.formUser.txtapepat.value;
var am = document.formUser.txtapemat.value;
var dni = document.formUser.txtdni.value;


if (id == ""){
alert("Ingrese Id de usuario");
return false;
}

if (p1 == ""){
alert("Ingrese password (01) ");
return false;
}

if (p2 == ""){
alert("Ingrese password (02) ");
return false;
}

if (p2 != p1){
alert("Password no coinciden ");
return false;
}

if (no == ""){
alert("Ingrese nombre ");
return false;
}

if (ap == ""){
alert("Ingrese Apellido Paterno");
return false;
}

if (am == ""){
alert("Ingrese Apellido Materno");
return false;
}

if (dni == ""){
alert("Ingrese DNI");
return false;
}
	
return true;
}


</script> 
<link href="css/stylescheet.css" rel="stylesheet" type="text/css" />
</head>

<body  >
                <!-- work-->
<form id="formUser" name="formUser" onsubmit="return validar();" action="UsuarioRegServlet" method="post" >                
<!-- 	<form id="formUser" name="formUser" action="" onsubmit="return validar();">  -->     
                  <table width="100%">
				<tr>     
                <td colspan="2" valign="top">
     
                <div class="title">Control de usuarios</div>                </td>
                </tr>
                <tr>
                  <td width="19%" valign="top">&nbsp;</td>
                  <td width="81%" align="left">&nbsp;</td>
                </tr>
                <tr>
                  <td valign="top">Cod interno</td>
                  <td align="left"><input type="text" name="txtcod" id="txtcod" /></td>
                </tr>
                <tr>
                  <td valign="top">Id Usuario</td>
                  <td align="left"><input type="text" name="txtid" id="idusuario" /></td>
                </tr>
                <tr>
                  <td valign="top">Clave:</td>
                  <td align="left"><input type="password" name="txtpass01" id="passuser01" /></td>
                </tr>
				<tr>
                  <td valign="top">Reingrese clave:</td>
                  <td align="left"><input type="password" name="txtpass02" id="passuser02" /></td>
                </tr>                
                <tr>
                  <td valign="top">Nombres</td>
                  <td align="left"><input type="text" name="txtnombre" id="txtnombre" /></td>
                </tr>
                <tr>
                  <td valign="top">Ap. Paterno</td>
                  <td align="left"><input type="text" name="txtapepat" id="txtapepat" /></td>
                </tr>
                <tr>
                  <td valign="top">Ap. Materno</td>
                  <td align="left"><input type="text" name="txtapemat" id="txtapemat" /></td>
                </tr>                
                <tr>
                  <td valign="top">DNI</td>
                  <td align="left"><input type="text" size="8" name="txtdni" id="txtdni" /></td>
                </tr>
                <tr>
                  <td valign="top">Rol</td>
                  <td align="left">
                  
                  <select name="lstRoles">
				<option value="SUPERVISOR">Supervisor</option>
				<option value="ABOGADO">Abogado</option>
				<option value="EMPLEADO">Empleado</option>
				<option value="ADMIN">Administrador</option>
				</select></td>
                </tr>
                
                <tr>
                  <td valign="top">&nbsp;</td>
                  <td align="left"><label>
                    <input type="submit" name="Grabar" id="Grabar" value="Enviar" />
                  </label></td>
                </tr>     
                </table>			
     </form>
              <!--Work-->   
</body>
</html>